Add a return value
authorEmmanuele Bassi <ebassi@gnome.org>
Tue, 24 Oct 2017 15:58:06 +0000 (16:58 +0100)
committerEmmanuele Bassi <ebassi@gnome.org>
Tue, 24 Oct 2017 15:58:06 +0000 (16:58 +0100)
When building with G_DISABLE_ASSERT, the g_assert_not_reached()
statement won't do anything, and we're going to fall through, and the
compiler will emit a warning that we're not returning anything from a
function with a return value.

gdk/wayland/gdkwindow-wayland.c

index bb15eb18201be5c6c07e4d8a01f06e4a53661a08..2d738a63ca5ef145cc054e17b1c255d6bf2a5b91 100644 (file)
@@ -1617,6 +1617,9 @@ rect_anchor_to_anchor (GdkGravity rect_anchor)
     default:
       g_assert_not_reached ();
     }
+
+  return (ZXDG_POSITIONER_V6_ANCHOR_TOP |
+          ZXDG_POSITIONER_V6_ANCHOR_LEFT);
 }
 
 static enum zxdg_positioner_v6_gravity
@@ -1650,6 +1653,9 @@ window_anchor_to_gravity (GdkGravity rect_anchor)
     default:
       g_assert_not_reached ();
     }
+
+  return (ZXDG_POSITIONER_V6_GRAVITY_BOTTOM |
+          ZXDG_POSITIONER_V6_GRAVITY_RIGHT);
 }
 
 static GdkWindow *